package com.wn.class30.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * product
 * @author 
 */
public class Product implements Serializable {
    /**
     * 商品ID
     */
        private Integer productId;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 商品描述
     */
    private String productDesc;

    /**
     * 商家ID
     */
    private Integer businessId;

    /**
     * 原价
     */
    private Double productPrice;

    /**
     * 商品类别
     */
    private Integer productType;

    /**
     * 促销价
     */
    private Double promotionPrice;

    /**
     * 商品库存
     */
    private Integer productNum;

    /**
     * 商品状态
     */
    private Integer productStatus;

    /**
     * 商品编号
     */
    private String productCode;

    /**
     * 销量
     */
    private Integer productSales;

    /**
     * 商品展示图片
     */
    private String productImg;

    /**
     * 商品是否热卖
     */
    private String productIshot;
    private Business business;
    private Producttype producttype;
    private List<ProductImgHead> productImgHeads;
    private List<ProductImgDetail> productImgDetails;

    public List<ProductImgHead> getProductImgHeads() {
        return productImgHeads;
    }

    public void setProductImgHeads(List<ProductImgHead> productImgHeads) {
        this.productImgHeads = productImgHeads;
    }

    public List<ProductImgDetail> getProductImgDetails() {
        return productImgDetails;
    }

    public void setProductImgDetails(List<ProductImgDetail> productImgDetails) {
        this.productImgDetails = productImgDetails;
    }

    public void setBusiness(Business business) {
        this.business = business;
    }

    public Business getBusiness() {
        return business;
    }


    private static final long serialVersionUID = 1L;

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductDesc() {
        return productDesc;
    }

    public void setProductDesc(String productDesc) {
        this.productDesc = productDesc;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public Double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(Double productPrice) {
        this.productPrice = productPrice;
    }

    public Integer getProductType() {
        return productType;
    }

    public void setProductType(Integer productType) {
        this.productType = productType;
    }

    public Double getPromotionPrice() {
        return promotionPrice;
    }

    public void setPromotionPrice(Double promotionPrice) {
        this.promotionPrice = promotionPrice;
    }

    public Integer getProductNum() {
        return productNum;
    }

    public void setProductNum(Integer productNum) {
        this.productNum = productNum;
    }

    public Integer getProductStatus() {
        return productStatus;
    }

    public void setProductStatus(Integer productStatus) {
        this.productStatus = productStatus;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public Integer getProductSales() {
        return productSales;
    }

    public void setProductSales(Integer productSales) {
        this.productSales = productSales;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public String getProductIshot() {
        return productIshot;
    }

    public void setProductIshot(String productIshot) {
        this.productIshot = productIshot;
    }



    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Product other = (Product) that;
        return (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getProductDesc() == null ? other.getProductDesc() == null : this.getProductDesc().equals(other.getProductDesc()))
            && (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
            && (this.getProductPrice() == null ? other.getProductPrice() == null : this.getProductPrice().equals(other.getProductPrice()))
            && (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType()))
            && (this.getPromotionPrice() == null ? other.getPromotionPrice() == null : this.getPromotionPrice().equals(other.getPromotionPrice()))
            && (this.getProductNum() == null ? other.getProductNum() == null : this.getProductNum().equals(other.getProductNum()))
            && (this.getProductStatus() == null ? other.getProductStatus() == null : this.getProductStatus().equals(other.getProductStatus()))
            && (this.getProductCode() == null ? other.getProductCode() == null : this.getProductCode().equals(other.getProductCode()))
            && (this.getProductSales() == null ? other.getProductSales() == null : this.getProductSales().equals(other.getProductSales()))
            && (this.getProductImg() == null ? other.getProductImg() == null : this.getProductImg().equals(other.getProductImg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProductDesc() == null) ? 0 : getProductDesc().hashCode());
        result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
        result = prime * result + ((getProductPrice() == null) ? 0 : getProductPrice().hashCode());
        result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode());
        result = prime * result + ((getPromotionPrice() == null) ? 0 : getPromotionPrice().hashCode());
        result = prime * result + ((getProductNum() == null) ? 0 : getProductNum().hashCode());
        result = prime * result + ((getProductStatus() == null) ? 0 : getProductStatus().hashCode());
        result = prime * result + ((getProductCode() == null) ? 0 : getProductCode().hashCode());
        result = prime * result + ((getProductSales() == null) ? 0 : getProductSales().hashCode());
        result = prime * result + ((getProductImg() == null) ? 0 : getProductImg().hashCode());
        result = prime * result + ((getProductIshot() == null) ? 0 : getProductIshot().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "Product{" +
                "productId=" + productId +
                ", productName='" + productName + '\'' +
                ", productDesc='" + productDesc + '\'' +
                ", businessId=" + businessId +
                ", productPrice=" + productPrice +
                ", productType=" + productType +
                ", promotionPrice=" + promotionPrice +
                ", productNum=" + productNum +
                ", productStatus=" + productStatus +
                ", productCode='" + productCode + '\'' +
                ", productSales=" + productSales +
                ", productImg='" + productImg + '\'' +
                ", productIshot='" + productIshot + '\'' +
                ", business=" + business +
                ", productImgHeads=" + productImgHeads +
                ", productImgDetails=" + productImgDetails +
                '}';
    }

    public Producttype getProducttype() {
        return producttype;
    }

    public void setProducttype(Producttype producttype) {
        this.producttype = producttype;
    }
}